//
// Decompiled by Jadx - 888ms
//
package fg;

import a.g;
import a.i;
import android.app.Activity;
import android.content.Intent;
import android.text.TextUtils;
import android.util.Log;
import android.widget.TextView;
import androidx.activity.b;
import androidx.appcompat.app.t;
import by.a;
import cc.u;
import com.azhon.appupdate.service.DownloadService;
import com.google.gson.Gson;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import fg.g;
import fg.i;
import fi.c;
import fi.e;
import fi.w;
import fm.l;
import fm.n;
import fn.j;
import fn.k;
import fn.p;
import fn.y;
import gc.aa;
import gc.ac;
import gc.ai;
import gc.ap;
import gc.aq;
import gc.at;
import gc.av;
import gc.aw;
import gc.bc;
import gc.bt;
import gc.cf;
import gc.ck;
import gc.z;
import gf.ac;
import gf.p;
import java.io.File;
import java.io.FilenameFilter;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import me.jingbin.library.ByRecyclerView;
import me.plusne.GreenDao.dao.ConfigDao;
import me.plusne.GreenDao.dao.LookHomeJsonDao;
import me.plusne.MainActivity;
import me.plusne.NativeTools;
import me.plusne.common.Http.Home;
import me.plusne.common.Http.Hook;
import me.plusne.common.Json.JsonHomeAppVersionList;
import me.plusne.common.Json.JsonHomeAppVersionSetList;
import me.plusne.common.Json.JsonHookStatic;
import me.plusne.common.Json.JsonUpdateApp;
import me.plusne.common.Json.JsonWxMessage;
import me.plusne.common.Json.Login.JsonLoginUserInfo;
import me.plusne.common.Json.Soul.JsonOnlineState;
import me.plusne.common.Json.Soul.JsonSoulAutoMessage;
import me.plusne.common.Json.Soul.JsonSoulGetUserInfos;
import me.plusne.common.Json.VoteSubmit;
import org.json.JSONObject;
import r.h;
import s.ao;
import s.m;

public final class f implements w.b, w.c, w.e, ac.c, z.a, ac.b, ByRecyclerView.i {
    public final int a;
    public final Object c;
    public final Object d;

    public f(int i, Object obj, Object obj2) {
        this.a = i;
        this.c = obj;
        this.d = obj2;
    }

    public final void _t(int i) {
        ao aoVar = (ao) this.c;
        Activity activity = (Activity) this.d;
        VoteSubmit voteSubmit = (VoteSubmit) aoVar.b.e(i);
        if (voteSubmit.getRole() == 3) {
            w wVar = new w(activity);
            wVar.bj(fi.e.INPUT_MULTI);
            wVar.bi("管理员回复");
            wVar.k = voteSubmit.getAdmin_msg();
            wVar.bc(voteSubmit.getDesc());
            wVar.w = new bt(aoVar, activity, voteSubmit, i);
            wVar.bk();
        }
    }

    public final void b(String str, Object[] objArr) {
        cf.g gVar = (cf.g) this.c;
        Object[] objArr2 = (Object[]) this.d;
        int i = cf.g.a;
        gVar.getClass();
        if (!TextUtils.isEmpty(str)) {
            JsonSoulGetUserInfos jsonSoulGetUserInfos = (JsonSoulGetUserInfos) b.c(str, JsonSoulGetUserInfos.class);
            if (jsonSoulGetUserInfos.getCode() == 10001 && jsonSoulGetUserInfos.getData() != null && !jsonSoulGetUserInfos.getData().isEmpty()) {
                fn.b.k(z.dm(cf.cp), 6, String.valueOf(((JsonSoulGetUserInfos.DataBean) jsonSoulGetUserInfos.getData().get(0)).getBirthday()), "");
                cf cfVar = gVar.b;
                cf.dh(cfVar, cfVar.db, cf.cp, objArr2[0]);
            }
        }
    }

    public final void e(Method method, Object[] objArr) {
        JsonOnlineState jsonOnlineState = (JsonOnlineState) this.c;
        String str = (String) this.d;
        int i = p.a;
        if (method.getName().equals("onNext")) {
            Object obj = objArr[0];
            String as = j.as(obj, "targetToMeAlias");
            Object ea = z.ea();
            String as2 = j.as(obj, "signature");
            if (!Objects.equals(j.as(ea, "signature"), as) && !TextUtils.isEmpty(as)) {
                as2 = as2 + "(" + as + ")";
            }
            JsonHookStatic jsonHookStatic = y.by;
            if (jsonHookStatic.getDb() != null) {
                LookHomeJsonDao lookHomeJsonDao = jsonHookStatic.getDb().u;
                lookHomeJsonDao.getClass();
                g gVar = new g(lookHomeJsonDao);
                gVar.l(LookHomeJsonDao.Properties.From.f(jsonOnlineState.getFrom()), new i[]{LookHomeJsonDao.Properties.To.f(jsonOnlineState.getTo())});
                gVar.i(1);
                fm.g gVar2 = (fm.g) gVar.k();
                if (gVar2 == null) {
                    gVar2 = new fm.g();
                    gVar2.b = jsonOnlineState.getFrom();
                    gVar2.c = jsonOnlineState.getTo();
                    gVar2.d = str;
                    gVar2.e = as2;
                    gVar2.h = 1;
                    gVar2.i = j.as(obj, "avatarName");
                    gVar2.f = System.currentTimeMillis();
                    jsonHookStatic.getDb().j(gVar2);
                } else {
                    gVar2.b = jsonOnlineState.getFrom();
                    gVar2.c = jsonOnlineState.getTo();
                    gVar2.d = str;
                    gVar2.e = as2;
                    gVar2.i = j.as(obj, "avatarName");
                    gVar2.h++;
                    gVar2.f = System.currentTimeMillis();
                    jsonHookStatic.getDb().l(gVar2);
                }
                if (j.ae("showLookHome")) {
                    jsonHookStatic.getMainHandler().post(new k(gVar2, 1));
                }
            }
        }
    }

    public final void f(l lVar) {
        XC_MethodHook.MethodHookParam methodHookParam = (XC_MethodHook.MethodHookParam) this.d;
        int i = ck.a.a;
        Integer valueOf = Integer.valueOf(lVar.d);
        Object obj = this.c;
        XposedHelpers.setObjectField(obj, "fileDuration", valueOf);
        XposedHelpers.setObjectField(obj, "fileUrl", lVar.b);
        r.f i2 = r.f.i();
        i2.n();
        i2.l("已替换瞬间语音:[" + lVar.c + "]");
        j.w(methodHookParam);
    }

    /* JADX WARN: Removed duplicated region for block: B:25:0x00b6  */
    /* JADX WARN: Removed duplicated region for block: B:27:? A[RETURN, SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void g(w wVar, boolean z) {
        String str;
        boolean z2 = false;
        switch (this.a) {
            case 3:
                String str2 = (String) this.c;
                String str3 = (String) this.d;
                int i = gc.b.cp;
                if (z) {
                    r.f i2 = r.f.i();
                    i2.n();
                    i2.d = 48;
                    i2.l("已设置自动礼物类型[" + str2 + "]");
                    y.co(str3, "sendGiftJson");
                } else {
                    z.ek(y.by.getSoul().getToChatUserId(), str3);
                    r.f i3 = r.f.i();
                    i3.n();
                    i3.d = 48;
                    i3.l("礼物已发送");
                }
                wVar.c.dismiss();
                return;
            case 9:
                ck.c cVar = (ck.c) this.c;
                String str4 = (String) this.d;
                int i4 = ck.c.a;
                cVar.getClass();
                if (z) {
                    z.dw(str4, new ck.c.a());
                    return;
                }
                return;
            case 10:
                ck.c cVar2 = (ck.c) this.c;
                XC_MethodHook.MethodHookParam methodHookParam = (XC_MethodHook.MethodHookParam) this.d;
                if (z) {
                    List list = (List) XposedHelpers.getObjectField(cVar2.b.cq, "attachments");
                    if (list != null) {
                        for (Object obj : list) {
                            long longField = XposedHelpers.getLongField(obj, "id");
                            String as = j.as(obj, "fileUrl");
                            if (!TextUtils.isEmpty(as)) {
                                fn.g.c(y.by.getActivity(), as, "Img_" + longField + ".png");
                            }
                        }
                        return;
                    }
                } else {
                    int i5 = ck.c.a;
                    cVar2.getClass();
                }
                j.w(methodHookParam);
                return;
            case 14:
                gj.b bVar = (gj.b) this.c;
                String str5 = (String) this.d;
                if (z) {
                    r.g.b(bVar.d.b, str5);
                    return;
                } else {
                    bVar.getClass();
                    return;
                }
            case 18:
                Activity activity = (Activity) this.c;
                JsonUpdateApp jsonUpdateApp = (JsonUpdateApp) this.d;
                if (z) {
                    if (a.a == null) {
                        synchronized (a.class) {
                            if (a.a == null) {
                                a.a = new a(activity);
                            }
                        }
                    }
                    a aVar = a.a;
                    aVar.d = "PlusNE" + jsonUpdateApp.getAppcodename() + ".apk";
                    String h = NativeTools.h(jsonUpdateApp.getDownurl(), 60);
                    aVar.c = h;
                    aVar.f = -2113011712;
                    if (TextUtils.isEmpty(h)) {
                        str = "apkUrl can not be empty!";
                    } else if (TextUtils.isEmpty(aVar.d)) {
                        str = "apkName can not be empty!";
                    } else if (!aVar.d.endsWith(".apk")) {
                        str = "apkName must endsWith .apk!";
                    } else {
                        aVar.e = aVar.b.getExternalCacheDir().getPath();
                        if (aVar.f == -1) {
                            str = "smallIcon can not be empty!";
                        } else {
                            androidx.constraintlayout.widget.i.bh = aVar.b.getPackageName() + ".fileProvider";
                            if (aVar.g == null) {
                                aVar.g = new bu.a();
                            }
                            z2 = true;
                            if (!z2) {
                                aVar.b.startService(new Intent(aVar.b, (Class<?>) DownloadService.class));
                                return;
                            }
                            return;
                        }
                    }
                    Log.e("AppUpdate.DownloadManager", str);
                    if (!z2) {
                    }
                } else {
                    return;
                }
            default:
                s.j jVar = (s.j) this.c;
                Activity activity2 = (Activity) this.d;
                jVar.getClass();
                m mVar = new m(activity2, false);
                mVar.d(new me.plusne.Adapter.Login.g(jVar, activity2, mVar, 8));
                return;
        }
    }

    public final void h(String str, String str2, w wVar, boolean z) {
        r.f i;
        String str3;
        int i2 = this.a;
        Object obj = this.d;
        Object obj2 = this.c;
        switch (i2) {
            case 0:
                g.a aVar = (g.a) obj2;
                g gVar = (g) obj;
                aVar.getClass();
                if (!TextUtils.isEmpty(str)) {
                    int bindingAdapterPosition = aVar.getBindingAdapterPosition();
                    gVar.a.set(bindingAdapterPosition, new fi.a(str, ""));
                    gVar.notifyItemChanged(bindingAdapterPosition);
                    return;
                }
                return;
            case 1:
                i.a aVar2 = (i.a) obj2;
                i iVar = (i) obj;
                int i3 = i.a.a;
                aVar2.getClass();
                if (!TextUtils.isEmpty(str) && !TextUtils.isEmpty(str2)) {
                    int bindingAdapterPosition2 = aVar2.getBindingAdapterPosition();
                    iVar.a.set(bindingAdapterPosition2, new fi.a(str, str2));
                    iVar.notifyItemChanged(bindingAdapterPosition2);
                    return;
                }
                return;
            case 5:
                String str4 = (String) obj;
                JsonSoulAutoMessage jsonSoulAutoMessage = at.cp;
                ((at) obj2).getClass();
                if (z && !TextUtils.isEmpty(str)) {
                    y.co(str, "BIBI_TRIGGER");
                    at.cx(str4, str);
                    return;
                }
                return;
            case 11:
                String str5 = (String) obj2;
                p.c cVar = (p.c) obj;
                TextView textView = gf.p.cp;
                if (z) {
                    String trim = str.trim();
                    if (TextUtils.isEmpty(trim)) {
                        i = r.f.i();
                        i.j();
                        str3 = "密码不能为空";
                    } else {
                        if (NativeTools.d(trim).equals(str5)) {
                            wVar.az();
                            if (cVar != null) {
                                cVar.c();
                                return;
                            }
                            return;
                        }
                        i = r.f.i();
                        i.j();
                        str3 = "密码错误";
                    }
                    i.l(str3);
                    return;
                }
                wVar.az();
                return;
            case 12:
                ac.b bVar = (ac.b) obj2;
                w wVar2 = (w) obj;
                int i4 = ac.b.a;
                bVar.getClass();
                if (z) {
                    boolean isEmpty = TextUtils.isEmpty(str);
                    gf.ac acVar = bVar.b;
                    if (isEmpty) {
                        if (acVar.cr != null) {
                            y.by.getDb().h(acVar.cr);
                        }
                    } else {
                        n nVar = acVar.cr;
                        if (nVar == null) {
                            n nVar2 = new n();
                            acVar.cr = nVar2;
                            nVar2.c = str;
                            nVar2.b = XposedHelpers.getLongField(gf.ac.cq, y.cj("msgId"));
                            y.by.getDb().j(acVar.cr);
                        } else {
                            nVar.c = str;
                            y.by.getDb().l(acVar.cr);
                        }
                    }
                    j.aa(gf.f.cp, "notifyDataSetChanged");
                    wVar2.az();
                    return;
                }
                return;
            default:
                s.f fVar = (s.f) obj2;
                Activity activity = (Activity) obj;
                fVar.getClass();
                if (!z) {
                    wVar.az();
                    return;
                }
                long currentTimeMillis = (System.currentTimeMillis() / 1000) - s.f.a;
                if (currentTimeMillis < 60) {
                    r.f fVar2 = new r.f(activity);
                    fVar2.d = 17;
                    fVar2.j();
                    fVar2.l("请等待 " + (60 - currentTimeMillis) + " 秒后再次发送");
                    return;
                }
                fi.y.e(activity);
                fVar.b = str;
                t.c().j(((Home) dq.b.b(Home.class)).sendCode("", str, 1).subscribeWith(new s.e(fVar, activity, activity)));
                return;
        }
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Code restructure failed: missing block: B:264:0x04c8, code lost:
    
        if (r2.equals("发送邀请发瞬间消息") == false) goto L233;
     */
    /* JADX WARN: Failed to find 'out' block for switch in B:129:0x055f. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:29:0x01a8. Please report as an issue. */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void i(w wVar, c.a aVar, int i, int i2) {
        int i3;
        String str;
        r.f i4;
        String message;
        Object bl;
        Gson gson;
        Object obj;
        w wVar2;
        aq aqVar;
        av avVar;
        Object ad;
        char c;
        Boolean valueOf;
        String str2;
        boolean isSelected;
        r.f fVar;
        w wVar3;
        w wVar4;
        gc.e gVar;
        char c2 = '\n';
        int i5 = this.a;
        char c3 = 65535;
        Object obj2 = this.d;
        Object obj3 = this.c;
        switch (i5) {
            case 2:
                u uVar = (u) obj3;
                JsonWxMessage jsonWxMessage = (JsonWxMessage) obj2;
                int i6 = x.a;
                String title = aVar.getTitle();
                title.getClass();
                int hashCode = title.hashCode();
                if (hashCode != 5798557) {
                    if (hashCode != 9835718) {
                        if (hashCode == 0x0243a8a3 && title.equals("非密友")) {
                            c3 = 2;
                        }
                    } else if (title.equals("设置为密友并隐藏")) {
                        c3 = 1;
                    }
                } else if (title.equals("设置为密友不隐藏")) {
                    c3 = 0;
                }
                if (c3 != 0) {
                    if (c3 == 1) {
                        fn.b.j(691, jsonWxMessage.getUserName(), "1");
                        TextView textView = uVar.c;
                        textView.setText(r.g.w(textView, "<font color='#0088FF'>密友已隐藏</font>"));
                        i3 = 1;
                    } else if (c3 == 2) {
                        uVar.c.setText("非密友");
                        fn.b.c(691, jsonWxMessage.getUserName());
                        i3 = 0;
                    }
                    jsonWxMessage.setType(i3);
                } else {
                    jsonWxMessage.setType(0);
                    fn.b.j(691, jsonWxMessage.getUserName(), "0");
                    TextView textView2 = uVar.c;
                    textView2.setText(r.g.w(textView2, "<font color='#00E080'>密友未隐藏</font>"));
                }
                wVar.az();
                return;
            case 4:
                AtomicReference atomicReference = (AtomicReference) obj3;
                List list = (List) obj2;
                ArrayList arrayList = ap.cp;
                wVar.az();
                String title2 = aVar.getTitle();
                title2.getClass();
                title2.hashCode();
                char c4 = 65535;
                switch (title2.hashCode()) {
                    case -2054446030:
                        if (title2.equals("不给Ta看")) {
                            c4 = 0;
                            break;
                        }
                        break;
                    case -1837433986:
                        if (title2.equals("仅自己可见")) {
                            c4 = 1;
                            break;
                        }
                        break;
                    case -426806508:
                        if (title2.equals("仅陌生人可见")) {
                            c4 = 2;
                            break;
                        }
                        break;
                    case 327049431:
                        if (title2.equals("仅校园吧用户可见")) {
                            c4 = 3;
                            break;
                        }
                        break;
                    case 412093293:
                        if (title2.equals("仅话题广场可见")) {
                            c4 = 4;
                            break;
                        }
                        break;
                    case 742834573:
                        if (title2.equals("广场可见")) {
                            c4 = 5;
                            break;
                        }
                        break;
                    case 2077764369:
                        if (title2.equals("仅主页可见")) {
                            c4 = 6;
                            break;
                        }
                        break;
                }
                switch (c4) {
                    case 0:
                        str = "BLOCK";
                        break;
                    case 1:
                        str = "PRIVATE";
                        break;
                    case 2:
                        str = "STRANGER";
                        break;
                    case 3:
                        str = "CAMPUS";
                        break;
                    case 4:
                        str = "TAG";
                        break;
                    case 5:
                        str = "PUBLIC";
                        break;
                    case 6:
                        str = "HOMEPAGE";
                        break;
                }
                atomicReference.set(str);
                new Thread((Runnable) new aa(2, list, atomicReference)).start();
                return;
            case 6:
                aw.e eVar = (aw.e) obj3;
                String str3 = (String) obj2;
                int i7 = aw.e.a;
                eVar.getClass();
                wVar.az();
                String title3 = aVar.getTitle();
                title3.getClass();
                switch (title3.hashCode()) {
                    case -1956162327:
                        if (title3.equals("发送超星菌消息")) {
                            c2 = 0;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -1815593285:
                        if (title3.equals("赠送全黄背景头像")) {
                            c2 = 1;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -1748122402:
                        if (title3.equals("发送匿名模式消息(对方不显示您的头像)")) {
                            c2 = 2;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -737541701:
                        if (title3.equals("查询Ta的定位信息")) {
                            c2 = 3;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -531593671:
                        if (title3.equals("自定义弹一弹")) {
                            c2 = 4;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -530301705:
                        if (title3.equals("自定义摸一摸")) {
                            c2 = 5;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -498322912:
                        if (title3.equals("发送自定义猜拳")) {
                            c2 = 6;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -498010775:
                        if (title3.equals("发送自定义骰子")) {
                            c2 = 7;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -445177634:
                        if (title3.equals("自动回复(需开启回复对象)")) {
                            c2 = '\b';
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -430392423:
                        if (title3.equals("赠送全黄背景头像自定义昵称")) {
                            c2 = '\t';
                            break;
                        }
                        c2 = 65535;
                        break;
                    case -296812647:
                        break;
                    case -268356195:
                        if (title3.equals("文本转语音设置")) {
                            c2 = 11;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 903146:
                        if (title3.equals("测试")) {
                            c2 = '\f';
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 110577789:
                        if (title3.equals("Ta的生日")) {
                            c2 = '\r';
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 428214745:
                        if (title3.equals("发送今日缘分")) {
                            c2 = 14;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 520235114:
                        if (title3.equals("发送定位消息")) {
                            c2 = 15;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 602062139:
                        if (title3.equals("发送文本语音")) {
                            c2 = 16;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 607186191:
                        if (title3.equals("发送收藏语音")) {
                            c2 = 17;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 691582714:
                        if (title3.equals("发送灰色小字")) {
                            c2 = 18;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 899659002:
                        if (title3.equals("聊天气泡(免会员)")) {
                            c2 = 19;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 917656426:
                        if (title3.equals("用户ID")) {
                            c2 = 20;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 937955165:
                        if (title3.equals("发送感谢送礼物提醒")) {
                            c2 = 21;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 980872205:
                        if (title3.equals("发送闪退消息")) {
                            c2 = 22;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 1177640039:
                        if (title3.equals("发送被擦灰提醒")) {
                            c2 = 23;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 1327491292:
                        if (title3.equals("发送让聊天记录隐藏")) {
                            c2 = 24;
                            break;
                        }
                        c2 = 65535;
                        break;
                    case 1724323601:
                        if (title3.equals("发送自定义哔哔机")) {
                            c2 = 25;
                            break;
                        }
                        c2 = 65535;
                        break;
                    default:
                        c2 = 65535;
                        break;
                }
                aw awVar = eVar.b;
                switch (c2) {
                    case 0:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_MULTI);
                        wVar2.aj = "发送超星菌消息";
                        wVar2.bb();
                        wVar2.k = y.cf("sayMaskHello", "");
                        aqVar = new aq(11);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case 1:
                        awVar.getClass();
                        aw.cz(j.as(z.ea(), "signature"));
                        return;
                    case 2:
                        Object bl2 = j.bl("cn.soulapp.imlib.msg.chat.JsonMsg", new Object[]{"anonymity_chat_header"});
                        try {
                            JSONObject jSONObject = new JSONObject();
                            jSONObject.put("chatUserCardContent", "https://img.soulapp.cn/app-source-prod/app-1/38/c_ct_chat_icon_mp.webp");
                            jSONObject.put("userAvatar", "https://img.soulapp.cn/app-source-prod/app-1/38/c_ct_chat_icon_mp.webp");
                            jSONObject.put("tUserAvatar", "https://img.soulapp.cn/app-source-prod/app-1/38/c_ct_chat_icon_mp.webp");
                            j.bn(bl2, "content", new Gson().toJson(jSONObject));
                            z.ep(z.dx(35, bl2, y.by.getSoul().getToChatUserId()));
                            return;
                        } catch (Exception e) {
                            e.printStackTrace();
                            return;
                        }
                    case 3:
                        new Thread((Runnable) new ai(str3, 1)).start();
                        return;
                    case 4:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_MULTI);
                        wVar2.k = y.cf("popup_it", "");
                        wVar2.aj = aVar.getTitle();
                        wVar2.bb();
                        aqVar = new aq(8);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case 5:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_MULTI);
                        wVar2.k = y.cf("pat_it", "");
                        wVar2.aj = aVar.getTitle();
                        wVar2.bb();
                        aqVar = new aq(9);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case 6:
                        w wVar5 = new w(y.by.getActivity());
                        awVar.cv = wVar5;
                        wVar5.aj = aVar.getTitle();
                        wVar5.bb();
                        wVar5.bj(fi.e.LIST_ITEM);
                        fi.b bVar = new fi.b();
                        bVar.d("石头", "3", "");
                        bVar.d("剪刀", "2", "");
                        bVar.d("布", "1", "");
                        awVar.cv.ay(bVar);
                        wVar2 = awVar.cv;
                        avVar = new av(eVar, 0);
                        wVar2.ae = avVar;
                        wVar2.bk();
                        return;
                    case 7:
                        w wVar6 = new w(y.by.getActivity());
                        awVar.cv = wVar6;
                        wVar6.aj = aVar.getTitle();
                        wVar6.bb();
                        wVar6.bj(fi.e.LIST_ITEM);
                        c cVar = new c();
                        cVar.setList(new ArrayList());
                        cVar.setTitle("");
                        cVar.setGroup(false);
                        cVar.setGravity(8388611);
                        int i8 = 0;
                        while (i8 < 6) {
                            i8++;
                            String valueOf2 = String.valueOf(i8);
                            c.a aVar2 = new c.a();
                            aVar2.setTitle(valueOf2);
                            aVar2.setDesc((String) null);
                            aVar2.setKey((String) null);
                            aVar2.setRightText((String) null);
                            aVar2.setArrow(false);
                            aVar2.setHideArrow(false);
                            cVar.getList().add(aVar2);
                        }
                        w wVar7 = awVar.cv;
                        wVar7.aq.add(cVar);
                        b bVar2 = wVar7.y;
                        if (bVar2 != null) {
                            bVar2.notifyItemChanged(r3.size() - 1);
                        }
                        wVar2 = awVar.cv;
                        avVar = new av(eVar, 1);
                        wVar2.ae = avVar;
                        wVar2.bk();
                        return;
                    case '\b':
                        y.co(Boolean.valueOf(aVar.isSelected()), "autoReply_" + y.by.getSoul().getToChatUserId());
                        return;
                    case '\t':
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_MULTI);
                        wVar2.aj = "赠送全黄背景头像自定义昵称";
                        wVar2.bb();
                        aqVar = new av(eVar, 2);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case '\n':
                        HashMap hashMap = new HashMap();
                        hashMap.put("userIdEcpt", z.do(y.by.getSoul().getToChatUserId()));
                        gc.ac acVar = new gc.ac();
                        acVar.de("https://api-a.soulapp.cn/invite/add/post", hashMap, "POST");
                        acVar.dg(new aq(12));
                        return;
                    case 11:
                        JsonHookStatic jsonHookStatic = y.by;
                        if (jsonHookStatic.getUserInfo() != null && jsonHookStatic.getUserInfo().getPay() < 4) {
                            b.r(jsonHookStatic.getActivity(), "当前功能只支持全永久会员使用");
                            return;
                        } else if (jsonHookStatic.getSoul().getAzureJsonLists() != null) {
                            aw.db();
                            return;
                        } else {
                            fi.y.e(jsonHookStatic.getActivity());
                            t.c().j(((Hook) dq.b.b(Hook.class)).TTS().subscribeWith(new bc(jsonHookStatic.getActivity())));
                            return;
                        }
                    case '\f':
                        Object bl3 = j.bl("cn.soulapp.imlib.msg.chat.JsonMsg", new Object[]{"refer_reply_card"});
                        j.ab(bl3, "putExt", new Object[]{"question", "阿沙拉肯德基阿1232134231斯拉达"});
                        j.ab(bl3, "putExt", new Object[]{"answer", "阿沙拉肯1212312331德基阿斯拉达"});
                        j.ab(bl3, "putExt", new Object[]{"desc", "2342342134234"});
                        j.ab(bl3, "putExt", new Object[]{"signature", "阿沙拉肯421342134德基阿斯拉达"});
                        j.ab(bl3, "putExt", new Object[]{"mood", "阿沙拉肯12323421341德基阿斯拉达"});
                        j.ab(bl3, "putExt", new Object[]{"isMeta", Boolean.TRUE});
                        Class ak = j.ak("cn.soulapp.imlib.msg.chat.ChatMessage");
                        JsonHookStatic jsonHookStatic2 = y.by;
                        Object ad2 = j.ad(ak, "create", new Object[]{jsonHookStatic2.getSoul().getToChatUserId()});
                        j.ab(ad2, "setMsgType", new Object[]{35});
                        j.ab(ad2, "setMsgContent", new Object[]{bl3});
                        j.ab(ad2, "putTransExt", new Object[]{"MSG_TYPE_KEY", "refer_reply_card"});
                        j.ab(ad2, "putTransExt", new Object[]{"MSG_TYPE_KEY", XposedHelpers.getObjectField(bl3, "content")});
                        ad = j.ad(j.ak("cn.soulapp.imlib.msg.ImMessage"), "createChatSendMsg", new Object[]{ad2, jsonHookStatic2.getSoul().getToChatUserId()});
                        z.el(ad);
                        return;
                    case '\r':
                    case 20:
                        j.ai(aVar.getDesc());
                        i4 = new r.f(y.by.getActivity());
                        i4.k();
                        message = "已复制:" + aVar.getDesc();
                        i4.l(message);
                        return;
                    case 14:
                        try {
                            if (y.ch("officialSend", false)) {
                                bl = j.bl("cn.soulapp.imlib.msg.chat.JsonMsg", new Object[]{"anonymity_prologue_card"});
                                HashMap hashMap2 = new HashMap();
                                HashMap hashMap3 = new HashMap();
                                hashMap3.put("text", y.cf("dayPred", "[心满意足]你们很般配哦"));
                                hashMap3.put("icon", "https://img.soulapp.cn/app-source-prod/app-1/38/c_ct_chat_icon_mp.webp");
                                hashMap2.put("payload", hashMap3);
                                gson = new Gson();
                                obj = hashMap2;
                            } else {
                                bl = j.bl("cn.soulapp.imlib.msg.chat.JsonMsg", new Object[]{"RECALL_NEWS"});
                                Object bk = j.bk(j.ak(y.cj("ReCallNewsBean")), new Object[0]);
                                j.bn(bk, "content", y.cf("dayPred", "[心满意足]你们很般配哦"));
                                j.bn(bk, "bgUrl", "https://img.soulapp.cn/app-source-prod/app-1/38/c_ic_recall_news.webp");
                                j.bn(bk, "buttonUrl", "https://china-img.soulapp.cn/admin/2023-02-28/1d614235-69e4-4ce2-a64c-4a0f80b24154.png");
                                j.bn(bk, "giftCommodityId", "910129701");
                                j.bn(bk, "buttonShow", "快速打招呼");
                                gson = new Gson();
                                obj = bk;
                            }
                            j.bn(bl, "content", gson.toJson(obj));
                            z.ep(z.dx(35, bl, y.by.getSoul().getToChatUserId()));
                            return;
                        } catch (Exception e2) {
                            e2.printStackTrace();
                            i4 = r.f.i();
                            i4.j();
                            message = e2.getMessage();
                            break;
                        }
                    case 15:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_KEY_OR_VALUE);
                        wVar2.aj = aVar.getTitle();
                        wVar2.bb();
                        aqVar = new aq(4);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case 16:
                        if (j.ae("textToVoice")) {
                            wVar2 = new w(y.by.getActivity());
                            wVar2.bj(fi.e.INPUT_MULTI);
                            wVar2.aj = aVar.getTitle();
                            wVar2.bb();
                            aqVar = new aq(6);
                            wVar2.w = aqVar;
                            wVar2.bk();
                            return;
                        }
                        r.f i9 = r.f.i();
                        i9.j();
                        i9.d = 17;
                        i9.l("请先打开文本转语音设置并且设置参数");
                        return;
                    case 17:
                        z.ej((z.a) null, "");
                        return;
                    case 18:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_MULTI);
                        wVar2.aj = aVar.getTitle();
                        wVar2.bb();
                        wVar2.k = y.cf("anonymity_prologue_card", "");
                        aqVar = new aq(10);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case 19:
                        z.df(false);
                        return;
                    case 21:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_MULTI);
                        wVar2.aj = aVar.getTitle();
                        wVar2.bb();
                        wVar2.k = y.cf("gift_postId", "");
                        aqVar = new aq(13);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case 22:
                        String toChatUserId = y.by.getSoul().getToChatUserId();
                        Object bl4 = j.bl("cn.soulapp.android.component.chat.bean.PlanetBActionMsg", new Object[0]);
                        j.bn(bl4, "imgUrl", "https://gw.alicdn.com/imgextra/i4/O1CN01H11jUw1gVppn3YjsM_!!6000000004148-2-tps-480-144.png");
                        Object bl5 = j.bl("cn.soulapp.imlib.msg.chat.JsonMsg", new Object[]{"sochat_vibrate_words", new Gson().toJson(bl4), "[PlusNE官方消息]"});
                        j.ab(bl5, "putExt", new Object[]{"signature", "[PlusNE官方消息]"});
                        j.ab(bl5, "putExt", new Object[]{"sendSignature", "[PlusNE官方消息]"});
                        j.ab(bl5, "putExt", new Object[]{"moodTip", "[PlusNE官方消息]"});
                        j.ab(bl5, "putExt", new Object[]{"stateTip", "[PlusNE官方消息]"});
                        j.ab(bl5, "putExt", new Object[]{"contentStr", "[PlusNE官方消息]"});
                        Object ad3 = j.ad(j.ak("cn.soulapp.imlib.msg.chat.ChatMessage"), "create", new Object[]{toChatUserId});
                        j.ab(ad3, "setMsgType", new Object[]{35});
                        j.ab(ad3, "setMsgContent", new Object[]{bl5});
                        j.bn(ad3, "notice", "PlusNE官方消息");
                        ad = j.ad(j.ak("cn.soulapp.imlib.msg.ImMessage"), "createChatSendMsg", new Object[]{ad3, toChatUserId});
                        z.el(ad);
                        return;
                    case 23:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT);
                        wVar2.ah = 2;
                        wVar2.aj = aVar.getTitle();
                        wVar2.bb();
                        wVar2.ak = "设置循环发送次数";
                        wVar2.bb();
                        wVar2.k = y.cf("bgImgNum", "1");
                        aqVar = new aq(5);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    case 24:
                        Object bl6 = j.bl("cn.soulapp.imlib.msg.chat.JsonMsg", new Object[]{"little_tip_new"});
                        String as = j.as(bl6, "content");
                        try {
                            JSONObject jSONObject2 = TextUtils.isEmpty(as) ? new JSONObject() : new JSONObject(as);
                            jSONObject2.put("url", "百度");
                            jSONObject2.put("urlText", "http://www.baidu.com");
                            jSONObject2.put("type", "AUDIT_AUTISTIC_TODAY");
                            j.bn(bl6, "content", jSONObject2.toString());
                        } catch (Exception e3) {
                            e3.printStackTrace();
                        }
                        z.em(z.dx(35, bl6, y.by.getSoul().getToChatUserId()));
                        return;
                    case 25:
                        wVar2 = new w(y.by.getActivity());
                        wVar2.bj(fi.e.INPUT_MULTI);
                        wVar2.k = y.cf("BIBI_TRIGGER", "");
                        wVar2.aj = aVar.getTitle();
                        wVar2.bb();
                        aqVar = new aq(7);
                        wVar2.w = aqVar;
                        wVar2.bk();
                        return;
                    default:
                        return;
                }
            case 15:
                gj.k kVar = (gj.k) obj3;
                String str4 = (String) obj2;
                kVar.getClass();
                String title4 = aVar.getTitle();
                StringBuilder sb = new StringBuilder("重启\"");
                JsonHookStatic jsonHookStatic3 = y.by;
                sb.append(jsonHookStatic3.getAppName());
                sb.append("\"");
                boolean equals = title4.equals(sb.toString());
                Activity activity = kVar.d;
                if (equals) {
                    r.g.e(activity, true);
                    return;
                }
                String title5 = aVar.getTitle();
                title5.getClass();
                title5.hashCode();
                switch (title5.hashCode()) {
                    case -1348108375:
                        if (title5.equals("音量键打开PlusNE菜单")) {
                            c = 0;
                            break;
                        }
                        c = 65535;
                        break;
                    case 365323693:
                        if (title5.equals("刷新模块数据")) {
                            c = 1;
                            break;
                        }
                        c = 65535;
                        break;
                    case 488021234:
                        if (title5.equals("云备份与恢复")) {
                            c = 2;
                            break;
                        }
                        c = 65535;
                        break;
                    case 628705545:
                        if (title5.equals("全局功能开关")) {
                            c = 3;
                            break;
                        }
                        c = 65535;
                        break;
                    case 703126252:
                        if (title5.equals("Fetch下载")) {
                            c = 4;
                            break;
                        }
                        c = 65535;
                        break;
                    case 760617752:
                        if (title5.equals("开通会员")) {
                            c = 5;
                            break;
                        }
                        c = 65535;
                        break;
                    case 928420224:
                        if (title5.equals("导入设置项")) {
                            c = 6;
                            break;
                        }
                        c = 65535;
                        break;
                    case 932859083:
                        if (title5.equals("导出设置项")) {
                            c = 7;
                            break;
                        }
                        c = 65535;
                        break;
                    case 1117954088:
                        if (title5.equals("重置设置项")) {
                            c = '\b';
                            break;
                        }
                        c = 65535;
                        break;
                    case 1652776197:
                        if (title5.equals("摇一摇打开PlusNE菜单")) {
                            c = '\t';
                            break;
                        }
                        c = 65535;
                        break;
                    case 1886599085:
                        if (title5.equals("系统下载管理器")) {
                            c = '\n';
                            break;
                        }
                        c = 65535;
                        break;
                    case 2018011625:
                        if (title5.equals("隐藏PlusNE菜单")) {
                            c = 11;
                            break;
                        }
                        c = 65535;
                        break;
                    case 2048110829:
                        if (title5.equals("摇一摇触发阈值")) {
                            c = '\f';
                            break;
                        }
                        c = 65535;
                        break;
                    default:
                        c = 65535;
                        break;
                }
                switch (c) {
                    case 0:
                        valueOf = Boolean.valueOf(aVar.isSelected());
                        str2 = "volumeTrigger";
                        fn.b.l(valueOf, str2);
                        return;
                    case 1:
                        if (jsonHookStatic3.getActivity() == null || !jsonHookStatic3.isLogin()) {
                            b.r(jsonHookStatic3.getActivity(), "未登录");
                            return;
                        }
                        fi.y.e(jsonHookStatic3.getActivity());
                        wVar.az();
                        gj.k.a.az();
                        new gj.f(jsonHookStatic3.getActivity(), new gj.g(kVar, 4));
                        return;
                    case 2:
                        if (gj.k.b == null) {
                            fi.y.e(activity);
                            gj.p pVar = new gj.p(kVar, activity);
                            if (jsonHookStatic3.getUserInfo() == null) {
                                return;
                            }
                            t.c().j(((Hook) dq.b.b(Hook.class)).queryYunData().subscribeWith(pVar));
                            return;
                        }
                        kVar.i();
                        return;
                    case 3:
                        valueOf = Boolean.valueOf(aVar.isSelected());
                        str2 = "allOpen";
                        fn.b.l(valueOf, str2);
                        return;
                    case 4:
                        isSelected = aVar.isSelected();
                        valueOf = Boolean.valueOf(isSelected);
                        str2 = "downType";
                        fn.b.l(valueOf, str2);
                        return;
                    case 5:
                        r.g.b(activity, jsonHookStatic3.getUserInfo().getUser());
                        return;
                    case 6:
                        File[] listFiles = new File(str4).listFiles((FilenameFilter) new fj.a(new String[]{"pn"}));
                        if (listFiles != null && listFiles.length != 0) {
                            c cVar2 = new c();
                            cVar2.setList(new ArrayList());
                            cVar2.setTitle("");
                            cVar2.setGroup(false);
                            cVar2.setGravity(8388611);
                            for (File file : listFiles) {
                                String name = file.getName();
                                String k = h.k(file.lastModified());
                                String path = file.getPath();
                                c.a aVar3 = new c.a();
                                aVar3.setTitle(name);
                                aVar3.setDesc(k);
                                aVar3.setKey(path);
                                aVar3.setRightText("导入设置");
                                aVar3.setArrow(true);
                                aVar3.setHideArrow(false);
                                cVar2.getList().add(aVar3);
                            }
                            wVar3 = new w(activity);
                            wVar3.bj(fi.e.LIST_ITEM);
                            wVar3.aj = "导入设置项";
                            wVar3.bb();
                            wVar3.u = false;
                            wVar3.bb();
                            wVar3.aq.add(cVar2);
                            b bVar3 = wVar3.y;
                            if (bVar3 != null) {
                                bVar3.notifyItemChanged(r3.size() - 1);
                            }
                            wVar3.ae = new gj.g(kVar, 6);
                            wVar4 = wVar3;
                            wVar4.bk();
                            return;
                        }
                        fVar = new r.f(activity);
                        fVar.d = 80;
                        fVar.j();
                        fVar.l("没有设置项可导出");
                        return;
                    case 7:
                        ConfigDao configDao = jsonHookStatic3.getDb().q;
                        configDao.getClass();
                        ArrayList j = new a.g(configDao).j();
                        if (!j.isEmpty()) {
                            wVar4 = new w(activity);
                            wVar4.bj(fi.e.INPUT);
                            wVar4.aj = "导出文件名";
                            wVar4.bb();
                            wVar4.r = "导出";
                            wVar4.bb();
                            wVar4.k = "PlusNE_setting_" + (System.currentTimeMillis() / 1000);
                            gVar = new me.plusne.Adapter.Login.g(kVar, j, str4, 7);
                            wVar4.w = gVar;
                            wVar4.bk();
                            return;
                        }
                        fVar = new r.f(activity);
                        fVar.d = 80;
                        fVar.j();
                        fVar.l("没有设置项可导出");
                        return;
                    case '\b':
                        wVar3 = new w(activity);
                        wVar3.bj(fi.e.MESSAGE);
                        wVar3.aj = "危险操作";
                        wVar3.bb();
                        wVar3.ak = "是否重置设置项,重置后无法撤销,建议先导出设置项后再重置";
                        wVar3.bb();
                        wVar3.r = "重置";
                        wVar3.bb();
                        wVar3.v = new gj.g(kVar, 5);
                        wVar4 = wVar3;
                        wVar4.bk();
                        return;
                    case '\t':
                        valueOf = Boolean.valueOf(aVar.isSelected());
                        str2 = "shakeType";
                        fn.b.l(valueOf, str2);
                        return;
                    case '\n':
                        isSelected = !aVar.isSelected();
                        valueOf = Boolean.valueOf(isSelected);
                        str2 = "downType";
                        fn.b.l(valueOf, str2);
                        return;
                    case 11:
                        valueOf = Boolean.valueOf(aVar.isSelected());
                        str2 = "hideMenuName";
                        fn.b.l(valueOf, str2);
                        return;
                    case '\f':
                        wVar4 = new w(activity);
                        wVar4.bj(fi.e.INPUT);
                        wVar4.aj = "摇一摇触发阈值";
                        wVar4.bb();
                        wVar4.r = "保存";
                        wVar4.bb();
                        wVar4.k = String.valueOf(fn.b.f(10, "shakeNum"));
                        wVar4.ah = 2;
                        gVar = new gc.e(aVar, wVar, 14);
                        wVar4.w = gVar;
                        wVar4.bk();
                        return;
                    default:
                        return;
                }
            case 16:
                gj.m mVar = (gj.m) obj3;
                JsonLoginUserInfo jsonLoginUserInfo = (JsonLoginUserInfo) obj2;
                mVar.getClass();
                if (aVar.getTitle().equals("到期时间") && aVar.isArrow()) {
                    r.g.b(mVar.a.d, jsonLoginUserInfo.getUser());
                    return;
                }
                return;
            case 17:
                MainActivity mainActivity = (MainActivity) obj3;
                JsonHomeAppVersionList jsonHomeAppVersionList = (JsonHomeAppVersionList) obj2;
                String str5 = MainActivity.w;
                mainActivity.getClass();
                JsonHomeAppVersionSetList jsonHomeAppVersionSetList = (JsonHomeAppVersionSetList) new Gson().fromJson(fn.b.g("HomeAppVersionSetList_" + jsonHomeAppVersionList.getPre() + "_" + aVar.getKey(), ""), JsonHomeAppVersionSetList.class);
                if (jsonHomeAppVersionSetList != null && jsonHomeAppVersionSetList.getData() != null) {
                    int toHour = jsonHomeAppVersionSetList.getToHour();
                    Date date = h.a;
                    if (toHour == Calendar.getInstance().get(11)) {
                        mainActivity.ab(jsonHomeAppVersionSetList, aVar.getTitle());
                        return;
                    }
                }
                fi.y.e(mainActivity);
                t.c().j(((Home) dq.b.b(Home.class)).getAppVersionSetList(jsonHomeAppVersionList.getPre(), aVar.getKey()).subscribeWith(new MainActivity.b(mainActivity, mainActivity, jsonHomeAppVersionList, aVar)));
                return;
            default:
                ((TextView) ((cc.c) obj3).g).setText(aVar.getTitle() + aVar.getDesc());
                ((w) obj2).az();
                return;
        }
    }
}
